This sample saves an image to file.

To save an image, specify the image in the FileName property and save it using the SaveImageToFile method. If the specified file already exists, it will be overwritten.
The image format is specified in the first argument of the SaveImageToFile method.

You can save the image currently loaded into the ImageKit control by specifying "null" or ImageKit1.Image in the second parameter of the SaveImageToFile method. You can also save other images directly by specifying them in the same way. For example, the code below saves the image currently displayed in a PictureBox control. It saves this image in the JPG format.

Example Code

[Visual Basic.NET]

ImageKit1.File.FileName = "JPG.jpg"
ImageKit1.File.SaveImageToFile(Newtone.ImageKit.SaveFileType.SaveJPEG, PictureBox1.Image)

[Visual C#.NET]

ImageKit1.File.FileName = "JPG.jpg";
ImageKit1.File.SaveImageToFile(Newtone.ImageKit.SaveFileType.SaveJPEG, PictureBox1.Image);

Relevant Properties

ImageKit.File.FileName

Relevant Methods

ImageKit.File.SaveFileDialog (Used to display the "Save File" Dialog and specify the save file name.)
ImageKit.File.SaveImageToFile

The ImageKit.NET3 is created by Newtone Corporation